package com.cxria.pattern.status.func1

class Context {

    static def openningState = new OpenningState()
    static def closeingState = new ClosingState()
    static def runningState = new RunningState()
    static def stoppingState = new StoppingState()

    LiftState liftState

    void setLiftState(LiftState liftState){
        this.liftState = liftState
        this.liftState.context = this
    }

    void open(){
        liftState.open()
    }

    void close(){
        liftState.close()
    }

    void run(){
        liftState.run()
    }

    void stop(){
        liftState.stop()
    }

}
